﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DFYE.Web.Controllers
{
    using Models;
    using JULONG.WEB.Library;
    public class IntroController : Controller
    {
        DataSession<entityDBContainer, SiteLibrary> db = new DataSession<entityDBContainer, SiteLibrary>();
        public ActionResult Index()
        {
            
            //entityDBContainer db = new entityDBContainer();

            //ViewData.Model = documents;

            return RedirectToAction("Intro");

        }

        public ActionResult Intro()
        {
            ViewData.Model = db.get(d => d.symbol == "intro") ?? new SiteLibrary();
            return View();
        }
        public ActionResult teacher()
        {
            

            ViewData.Model = db.get(d => d.symbol == "teacher") ?? new SiteLibrary();
            return View();
        }
        public ActionResult achievement()
        {


            ViewData.Model = db.get(d => d.symbol == "achievement");
            return View();
        }


        public ActionResult headmaster()
        {
            ViewData.Model = db.get(d => d.symbol == "headmaster") ?? new SiteLibrary();
            return View();
        }



    }
}
